import axios from "axios";
let service = axios.create({
  baseURL: "https://www.escook.cn/api",
  timeout: 6000,
});
service.interceptors.request.use(
  (confirm) => {
    return confirm;
  },
  (error) => {
    return console.log("请求失败", error);
  }
);

service.interceptors.response.use(
  (response) => {
    let res = response.data;
    return res;
  },
  (error) => {
    return console.log("请求失败", error);
  }
);
export default service;
